#ifndef ORG_LATESTBIT_SMARTOBJECTS_TESTMODEL_SIMPLESTRUCTURE_INL
#define ORG_LATESTBIT_SMARTOBJECTS_TESTMODEL_SIMPLESTRUCTURE_INL










namespace org_latestbit_smartobjects_testmodel {
inline SimpleStructure::SimpleStructure()






{}

inline SimpleStructure::SimpleStructure(const ISimpleStructure& src)






{
    copyFrom(src);
}

inline void SimpleStructure::operator = (const ISimpleStructure& src)
{
    copyFrom(src);
}


inline SimpleStructure::~SimpleStructure() {
}

inline const std::string& SimpleStructure::getObjectType() const {
    const static std::string OBJECT_TYPE =  "org.latestbit.smartobjects.testmodel.SimpleStructure";
    return OBJECT_TYPE;
}




inline  const  BigInteger& SimpleStructure::getIntVal() const {
    return intVal;
}

inline BigInteger& SimpleStructure::refIntVal() {
    return intVal;
}


inline void SimpleStructure::setIntVal(const BigInteger& value) {
    intVal = value;
}




inline  const  std::string& SimpleStructure::getStrVal() const {
    return strVal;
}

inline std::string& SimpleStructure::refStrVal() {
    return strVal;
}


inline void SimpleStructure::setStrVal(const std::string& value) {
    strVal = value;
}





inline void SimpleStructure::serialize(IDataTypesCoder* coder, IDataEncrypter* encrypter, ByteBuffer* writeBuffer) const {
    coder->encodeStructureDataTypeBegin(writeBuffer);
    unsigned int beginPartPos = 0;
    // Serialization fields for SimpleStructure:
    beginPartPos = coder->encodeNamedDataPartBegin("SimpleStructure", writeBuffer);
    coder->encodeBigInteger(intVal, writeBuffer);
    coder->encodeString(strVal, writeBuffer);
    coder->encodeNamedDataPartEnd(beginPartPos, writeBuffer);
    coder->encodeStructureDataTypeEnd(writeBuffer);
}

inline void SimpleStructure::deserialize(IDataTypesCoder* coder, IDataEncrypter* encrypter,  ByteBuffer* readBuffer) {
    if(coder->decodeStructureDataTypeBegin(readBuffer)) {
        unsigned int beginPartPos = 0;
        // Deserialization fields for SimpleStructure:
        beginPartPos = coder->decodeNamedDataPartBegin("SimpleStructure", readBuffer);
        coder->decodeBigInteger(intVal, readBuffer);
        coder->decodeString(strVal, readBuffer);
        coder->decodeNamedDataPartEnd(beginPartPos, readBuffer);
        coder->decodeStructureDataTypeEnd(readBuffer);
    }
}

inline void SimpleStructure::copyFrom(const ISimpleStructure& src) {
    intVal = src.getIntVal();
    strVal = src.getStrVal();
}
}

#endif // ORG_LATESTBIT_SMARTOBJECTS_TESTMODEL_SIMPLESTRUCTURE_INL
